import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.Scanner;


public class Test1 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        while (scan.hasNext()) {
          char[] c = scan.nextLine().toCharArray();
          String s2 = scan.nextLine();
            for (int i = 0; i < c.length; i++) {
                if(!s2.contains(c[i]+"")){
                    System.out.print(c[i]);
                }
            }
        }
    }
}
